#include<pthread.h>
#include<stdio.h>
#include<stdlib.h>
void* thread_func(void* arg)
{
    printf("Hello from thread!\n");
    return (void*)42;
}
int main()
{
    pthread_t tid;
    void* retval;
    pthread_create(&tid,NULL,thread_func,NULL);
    pthread_join(tid,&retval);
    printf("子进程结束，返回值 = %ld\n",(long)retval);
    return 0;
}